package test;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import dsa.LinkedList;
import expression.InfixtoPostfixTranslator;

public class CaseyCapriceIPTest
{
	@Test
	public void test1()
	{
		String answer = InfixtoPostfixTranslator.eval("1 + 2");
		assertTrue(answer.equals("1 2 +"));
	}
	
	@Test
	public void test2()
	{
		String answer = InfixtoPostfixTranslator.eval("1 + 2 * 3");
		assertTrue(answer.equals("1 2 3 * +"));
	}
	
	@Test
	public void test3()
	{
		String answer = InfixtoPostfixTranslator.eval("1 + 2 * 3 + 5 / 5");
		assertTrue(answer.equals("1 2 3 * 5 5 / + +"));
	}
	
	@Test
	public void test4()
	{
		String answer = InfixtoPostfixTranslator.eval("( 1 + 2 ) * ( 3 + 5 ) / 1");
		assertTrue(answer.equals("1 2 + 3 5 + * 1 /"));
	}
	
	@Test
	public void test5()
	{
		String answer = InfixtoPostfixTranslator.eval("( 1 + 2 ) * ( 3 + 5 ) / 1 + 3 * 4 + 2 * 3");
		assertTrue(answer.equals("1 2 + 3 5 + * 1 / 3 4 * 2 3 * + +"));
	}
}